<?php
/**
 * Extend Zend_Application_Resource_Translate
 * Auto select translate file by locale
 * 
 * @copyright  Copyright (c) 2011 Ricky Feng (http://code.google.com/p/rphp4zf)
 * @license    New BSD License
 */

class Mediad2_Application_Resource_Mail extends Zend_Application_Resource_Mail
{
    public function init()
    {
		$options = $this->getOptions(); 
		
		//判断是否设置options中的registryName，如果没有则增加默认值
		if (!isset($options['registryName'])) {
			$options['registryName'] = 'mailConfig';
		}
		
        //保存进注册表
        Zend_Registry::set($options['registryName'], $options);
        
        return $options;

    }
}

